<?php

namespace App\Util;

/**
 * 加密Util
 * 
 * Class encryption
 *
 * @package App\Util
 */
class EncryptionUtil
{

    /**
     * ck加密
     * 
     * @param array $request
     *
     * @return string
     */
    public static function tk(array $request)
    {
        if(isset($request['tk'])) {
            unset($request['tk']);
        }
        ksort($request);
        foreach ($request as &$v){
            $v = trim(urldecode($v));
        }
        return md5(implode("", array_values($request)));
    }
}